-- GENERATED SPELL FOR [Arcane Chimaerok] --


function spell0_12801(pUnit, Event) --@Counterspell,n/a--
pUnit:FullCastSpellOnTarget(20537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12801', 15000, 1)
end

function spell1_12801(pUnit, Event) --@Lightning Breath,n/a--
pUnit:FullCastSpellOnTarget(20630,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12801', 2000, 1)
end

function spell2_12801(pUnit, Event) --@Magic Reflection,n/a--
pUnit:FullCastSpellOnTarget(20223,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12801', 10301, 1)
end

function Sorts_12801(pUnit, Event)
local choix_sorts_12801 = math.random(0, 2)
if choix_sorts_12801 == 0 then
pUnit:RegisterEvent('spell0_12801', 1, 1)
end
if choix_sorts_12801 == 1 then
pUnit:RegisterEvent('spell1_12801', 1, 1)
end
if choix_sorts_12801 == 2 then
pUnit:RegisterEvent('spell2_12801', 1, 1)
end
end

function mob12801_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12801', math.random(1500, 3000), 1)
end

function mob12801_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12801_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12801_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12801, 1, 'mob12801_Action')
RegisterUnitEvent(12801, 2, 'mob12801_Leave')
RegisterUnitEvent(12801, 3, 'mob12801_Kill')
RegisterUnitEvent(12801, 4, 'mob12801_Die')
